package com.hspedu.homework.homework08;

/**
 * 1.在BankAccount类基础上扩展 新类CheckingAccount
 * 对每次存款和取款都收取1美元的手续费
 */
public class CheckingAccount extends BankAccount{
    public CheckingAccount(double initialBalance) {
        super(initialBalance);
    }

    @Override
    public void deposit(double amount) {//存款收手续费
        super.deposit(amount-1);
    }

    @Override
    public void withdraw(double amount) {//取款收手续费
        super.withdraw(amount+1);
    }

}
